<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://at.alicdn.com/t/font_975764_3r2oc75uoi.css">
        <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css">
        <link rel="stylesheet" href="/css/cheList.css">
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
        <div class="page">

         <div class="count">
             <%for(let i in list){%>
                <div class="child">
                        <div class="left">
                          <%=list[i].che%>
                        </div>
                        <div class="right">
                               <i class="iconfont  icon-picture-delet" data-id="<%=list[i]._id%>"></i>
                        </div>
                    </div>
                    <% } %>
                
                           
         </div>
        
           
     
            <div class="next">
                    <a href="/che/addChe" class="weui-btn lan">添加车辆</a>
           </div>
        </div> 
        <script src="https://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script>
        <script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.1.3/weui.min.js"></script>
        <script type="text/javascript">

          $('.iconfont').click(function(){
              var that = $(this);
              var datas = that.data('id');
              weui.confirm('该操作不可撤回', function () {
                    console.log('yes');
                    that.closest('.child').slideUp(500,function(){
                        $(this).remove()
                    });

                    $.ajax({url:"/che/cheDelte?id="+datas,success:function(result){
                        console.log('result',result);
                    }});

                }, function () {
                    console.log('no');
                }, {
                    title: '确定删除该信息？'
                });
          })

           
        </script> 
    </body>
</html>